package com.boilermaker.springbootdemo;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Setter
@Getter
@Configuration
//@ConfigurationProperties("student")
public class UserInfo {

    private String name;
    private int age;
    private String password;

    public UserInfo() {
    }

    // 当我们生成有参构造函数时，如果不确定无参构造函数是否会被用到，根据规范应当全写上
    public UserInfo(String name, int age, String password) {
        this.name = name;
        this.age = age;
        this.password = password;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", password='" + password + '\'' +
                '}';
    }
}
